import urllib.request
import urllib.parse
from lxml import etree

url ='https://www.baidu.com/'

header = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36'
}

request = urllib.request.Request(url,headers=header)
response = urllib.request.urlopen(request)
html = response.read().decode('utf-8')
tree = etree.HTML(html)
result = tree.xpath('//button[@id="chat-submit-button"]/text()')[0]
print(result)